package net.xdclass.manager;

import net.xdclass.enums.PayOrderType;
import net.xdclass.model.WxOrderInfoDO;
import net.xdclass.model.WxOrderStatusDO;
import net.xdclass.util.JsonData;

/**
 * @author Administrator
 * @description 微信支付 Manager
 * @since 2023-07-02 16:26
 */
public interface WxPayManager {

    /**
     * 插入待支付订单
     * @param wxOrderInfoDO
     * @return
     */
    public Integer insertPrepareOrder(WxOrderInfoDO wxOrderInfoDO);

    public Integer insertOrderStatus(WxOrderStatusDO wxOrderStatusDO);

    /**
     * 查询某个商户的某个订单状态
     * @param outTradeNo
     * @param merid
     * @return
     */
    public String queryOrderStatusByOutTradeNo(String outTradeNo, String merid);

    Boolean changeOrderStatusByOutTradeNo(String outTradeNo, String merid, PayOrderType oldStatus, PayOrderType newStatus);

    Boolean changeOrderStatusByOrderId(Long orderId, PayOrderType oldStatus, PayOrderType newStatus);

}
